package com.sina.weibo;

import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.sina.weibo.models.User;
import com.sina.weibo.models.UserInfo;
import com.sina.weibo.view.UserInfoItemView;
import java.io.File;

public class UserInfoActivity2 extends BaseActivity
  implements View.OnClickListener
{
  public static final String KEY_USER_VIP = "vip";
  public static final int RELATION_ATTENDED_BY_UID = 2;
  public static final int RELATION_ATTEND_EACHOTHER = 3;
  public static final int RELATION_ATTEND_TO_UID = 1;
  public static final int RELATION_NONE = 0;
  public static final int RELATION_UID_BLACK_LIST = 4;
  private static final int USERINFO_ITEM_CHINESE_STRING_MAX_LEN = 14;
  private static final int USERINFO_SELF_DESCRBE_ITEM_HEIGHT = 23;
  private static final int USERINFO_SELF_DESCRIBE_HEIGHT = 150;
  private final int RELOAD_USERINFO = 0;
  Handler handler;
  private boolean isInitial;
  private boolean mAttendTaskFree = 1;
  private Button mBnAt;
  private Button mBnMessage;
  private Button mBnReload;
  private Button mBtnEditOrAttend;
  private String mCacheDir;
  private boolean mHasNotAttention = 0;
  private ImageView mIvGental;
  private ImageView mIvPortrait;
  private RelativeLayout mLlAttend;
  private LinearLayout mLlFans;
  private LinearLayout mLlTopic;
  private LoadUserInfoTask mLoadUserInfoTask;
  private String mNick;
  private CustomToast mPgToast;
  private UserInfoItemView mRlDigest1;
  private UserInfoItemView mRlDigest2;
  private RelativeLayout mRlFav;
  private LinearLayout mRlWeibo;
  private TextView mTvAddress1;
  private TextView mTvAddress2;
  private TextView mTvAttend_Count;
  private TextView mTvFans_Count;
  private TextView mTvNickName;
  private TextView mTvSelfIntro1;
  private TextView mTvSelfIntro2;
  private TextView mTvSinaVip;
  private TextView mTvTopic_Count;
  private TextView mTvWeibo_Count;
  private String mUid;
  private User mUser;
  private UserInfo mUserInfo;
  private boolean mUserTaskFree = 1;
  private boolean mVip;

  public UserInfoActivity2()
  {
    UserInfoActivity2.1 local1 = new UserInfoActivity2.1(this);
    this.handler = local1;
  }

  private void addOrCancelAttend()
  {
    if (this.mAttendTaskFree)
    {
      AttentionTask localAttentionTask = new AttentionTask(null);
      Void[] arrayOfVoid = new Void[0];
      AsyncTask localAsyncTask = localAttentionTask.execute(arrayOfVoid);
    }
  }

  private void atCurrentUser()
  {
    if (this.mUserInfo != null)
    {
      StringBuilder localStringBuilder = new StringBuilder("@");
      String str1 = this.mUserInfo.nick;
      String str2 = str1 + " ";
      Intent localIntent = Utils.editAtBlog(this, str2);
      startActivity(localIntent);
    }
  }

  private void fansOnClickAction()
  {
    Intent localIntent1 = new Intent(this, UserWeiboAttentionFansList.class);
    String str1 = this.mUid;
    Intent localIntent2 = localIntent1.putExtra("uid", str1);
    Intent localIntent3 = localIntent1.putExtra("mode", 3);
    String str2 = StaticInfo.mUsername;
    Intent localIntent4 = localIntent1.putExtra("username", str2);
    String str3 = StaticInfo.mPassword;
    Intent localIntent5 = localIntent1.putExtra("password", str3);
    if (this.mNick != null)
    {
      String str4 = this.mNick;
      Intent localIntent6 = localIntent1.putExtra("nick", str4);
    }
    startActivity(localIntent1);
  }

  private void focusOnClickAction()
  {
    Intent localIntent1 = new Intent(this, UserWeiboAttentionFansList.class);
    String str1 = this.mUid;
    Intent localIntent2 = localIntent1.putExtra("uid", str1);
    Intent localIntent3 = localIntent1.putExtra("mode", 2);
    String str2 = StaticInfo.mUsername;
    Intent localIntent4 = localIntent1.putExtra("username", str2);
    String str3 = StaticInfo.mPassword;
    Intent localIntent5 = localIntent1.putExtra("password", str3);
    if (this.mNick != null)
    {
      String str4 = this.mNick;
      Intent localIntent6 = localIntent1.putExtra("nick", str4);
    }
    startActivity(localIntent1);
  }

  private int getTextViewLineCout(String paramString)
  {
    int i = paramString.length();
    int j = 0;
    if (j >= i)
    {
      i = (i - 0) / 2 + 0;
      if (i % 14 <= 0)
        break label64;
      i = i / 14 + 1;
    }
    while (true)
    {
      return i;
      char c = paramString.charAt(j);
      if (isChinese(c))
        int k = 0 + 1;
      j += 1;
      break;
      label64: i /= 14;
    }
  }

  private boolean isChinese(char paramChar)
  {
    Character.UnicodeBlock localUnicodeBlock1 = Character.UnicodeBlock.of(paramChar);
    Character.UnicodeBlock localUnicodeBlock2 = Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS;
    if (localUnicodeBlock1 != localUnicodeBlock2)
    {
      Character.UnicodeBlock localUnicodeBlock3 = Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS;
      if (localUnicodeBlock1 != localUnicodeBlock3)
      {
        Character.UnicodeBlock localUnicodeBlock4 = Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A;
        if (localUnicodeBlock1 != localUnicodeBlock4)
        {
          Character.UnicodeBlock localUnicodeBlock5 = Character.UnicodeBlock.GENERAL_PUNCTUATION;
          if (localUnicodeBlock1 != localUnicodeBlock5)
          {
            Character.UnicodeBlock localUnicodeBlock6 = Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION;
            if (localUnicodeBlock1 != localUnicodeBlock6)
            {
              Character.UnicodeBlock localUnicodeBlock7 = Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS;
              if (localUnicodeBlock1 != localUnicodeBlock7)
              {
                Character.UnicodeBlock localUnicodeBlock8 = Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS;
                if (localUnicodeBlock1 != localUnicodeBlock8)
                  break label86;
              }
            }
          }
        }
      }
    }
    label86: for (int i = 1; ; i = 0)
      return i;
  }

  private void loadUserInfo()
  {
    if (this.mUserTaskFree)
    {
      LoadUserInfoTask localLoadUserInfoTask1 = new LoadUserInfoTask(null);
      this.mLoadUserInfoTask = localLoadUserInfoTask1;
      LoadUserInfoTask localLoadUserInfoTask2 = this.mLoadUserInfoTask;
      Void[] arrayOfVoid = new Void[0];
      AsyncTask localAsyncTask = localLoadUserInfoTask2.execute(arrayOfVoid);
    }
  }

  private void reloadUserInfo()
  {
    if (this.mUserInfo != null)
    {
      String str1 = this.mUserInfo.nick;
      this.mNick = str1;
      String str2 = this.mUserInfo.uid;
      this.mUid = str2;
      Message localMessage = new Message();
      localMessage.what = 0;
      boolean bool = this.handler.sendMessage(localMessage);
    }
  }

  private void sendMessage()
  {
    if (this.mUserInfo != null)
    {
      String str = this.mUserInfo.nick;
      Intent localIntent = Utils.editPrivateMessage(this, str);
      startActivity(localIntent);
    }
  }

  private void setSelfDiscribeSize(UserInfoItemView paramUserInfoItemView, String paramString, boolean paramBoolean)
  {
    paramUserInfoItemView.setVisibility(0);
    int i;
    int j;
    if (this.isInitial)
    {
      i = getTextViewLineCout(paramString) - 1;
      if ((WeiboApplication.getTitleDisplayMode() == 0) && (i > 1))
        i += 1;
      j = paramUserInfoItemView.getWidth();
      if (!paramBoolean)
        break label124;
      if (paramUserInfoItemView.getHeight() >= 150)
        break label115;
    }
    label115: for (int k = 150; ; k = paramUserInfoItemView.getHeight())
    {
      int m = i * 23;
      int n = k + m;
      paramUserInfoItemView.setSize(j, n, 1);
      int i1 = paramUserInfoItemView.getMeasuredWidth();
      int i2 = paramUserInfoItemView.getMeasuredHeight();
      paramUserInfoItemView.measure(i1, i2);
      this.isInitial = 0;
      return;
    }
    label124: int i5;
    if (j == 0)
    {
      int i3 = this.mRlDigest2.getHeight() / 3 * 2;
      int i4 = i * 23;
      i5 = i3 + i4;
      j = this.mRlDigest2.getWidth();
    }
    while (true)
    {
      paramUserInfoItemView.setSize(j, i5, 1);
      break;
      int i6 = paramUserInfoItemView.getHeight();
      int i7 = i * 23;
      i5 = i6 + i7;
    }
  }

  private void setupDigetst(UserInfo paramUserInfo)
  {
    String str3;
    if (paramUserInfo.vip)
    {
      this.mRlDigest1.setVisibility(8);
      this.mRlDigest2.setVisibility(0);
      TextView localTextView1 = this.mTvSinaVip;
      String str1 = paramUserInfo.viptitle;
      localTextView1.setText(str1);
      TextView localTextView2 = this.mTvAddress2;
      String str2 = paramUserInfo.province;
      localTextView2.setText(str2);
      if (TextUtils.isEmpty(paramUserInfo.intro))
        if (paramUserInfo.gender == 1)
        {
          str3 = getString(2131427752);
          this.mTvSelfIntro2.setText(str3);
        }
    }
    while (true)
    {
      return;
      String str4 = String.valueOf(getString(2131427751));
      StringBuilder localStringBuilder1 = new StringBuilder(str4);
      String str5 = getString(2131427742);
      str3 = str5;
      break;
      TextView localTextView3 = this.mTvSelfIntro2;
      String str6 = paramUserInfo.intro;
      localTextView3.setText(str6);
      UserInfoItemView localUserInfoItemView1 = this.mRlDigest2;
      String str7 = paramUserInfo.intro;
      boolean bool1 = paramUserInfo.vip;
      setSelfDiscribeSize(localUserInfoItemView1, str7, bool1);
      continue;
      this.mRlDigest2.setVisibility(8);
      this.mRlDigest1.setVisibility(0);
      TextView localTextView4 = this.mTvAddress1;
      String str8 = paramUserInfo.province;
      localTextView4.setText(str8);
      if (TextUtils.isEmpty(paramUserInfo.intro))
      {
        if (paramUserInfo.gender == 1);
        StringBuilder localStringBuilder2;
        String str10;
        for (str3 = getString(2131427752); ; str3 = str10)
        {
          this.mTvSelfIntro1.setText(str3);
          break;
          String str9 = String.valueOf(getString(2131427751));
          localStringBuilder2 = new StringBuilder(str9);
          str10 = getString(2131427742);
        }
      }
      TextView localTextView5 = this.mTvSelfIntro1;
      String str11 = paramUserInfo.intro;
      localTextView5.setText(str11);
      UserInfoItemView localUserInfoItemView2 = this.mRlDigest1;
      String str12 = paramUserInfo.intro;
      boolean bool2 = paramUserInfo.vip;
      setSelfDiscribeSize(localUserInfoItemView2, str12, bool2);
    }
  }

  private void setupGroupCount(UserInfo paramUserInfo)
  {
    TextView localTextView1 = this.mTvAttend_Count;
    String str1 = String.valueOf(paramUserInfo.meattnum);
    localTextView1.setText(str1);
    TextView localTextView2 = this.mTvFans_Count;
    String str2 = String.valueOf(paramUserInfo.attmenum);
    localTextView2.setText(str2);
    TextView localTextView3 = this.mTvWeibo_Count;
    String str3 = String.valueOf(paramUserInfo.mblognum);
    localTextView3.setText(str3);
    TextView localTextView4 = this.mTvTopic_Count;
    String str4 = String.valueOf(paramUserInfo.favHotwordNum);
    localTextView4.setText(str4);
  }

  private void setupUI(UserInfo paramUserInfo)
  {
    String str3;
    label242: Object localObject1;
    if (!TextUtils.isEmpty(paramUserInfo.portrait))
    {
      String str1 = this.mCacheDir;
      String str2 = paramUserInfo.portrait;
      str3 = Utils.checkCache(str1, str2);
      if (str3 == null)
      {
        LoadPortraitTask localLoadPortraitTask = new LoadPortraitTask(null);
        String[] arrayOfString = new String[2];
        String str4 = paramUserInfo.portrait;
        arrayOfString[0] = str4;
        String str5 = getCacheDir().getAbsolutePath();
        arrayOfString[1] = str5;
        AsyncTask localAsyncTask = localLoadPortraitTask.execute(arrayOfString);
      }
    }
    else
    {
      TextView localTextView = this.mTvNickName;
      String str6 = paramUserInfo.nick;
      localTextView.setText(str6);
      setupDigetst(paramUserInfo);
      if ((paramUserInfo.relation != 1) && (paramUserInfo.relation != 3))
        break label367;
      this.mHasNotAttention = 0;
      Button localButton = this.mBtnEditOrAttend;
      String str7 = getString(2131427464);
      localButton.setText(str7);
      this.mBtnEditOrAttend.setBackgroundResource(2130838112);
      if ((paramUserInfo.relation == 3) || (paramUserInfo.relation == 2))
        this.mBnMessage.setEnabled(1);
      if ((!TextUtils.isEmpty(this.mNick)) && (!TextUtils.isEmpty(StaticInfo.mUser.nick)))
      {
        String str8 = this.mNick;
        String str9 = StaticInfo.mUser.nick;
        if (!str8.equalsIgnoreCase(str9))
          break label420;
        this.mBtnEditOrAttend.setVisibility(4);
      }
      localObject1 = this.mIvGental;
      if (paramUserInfo.gender != 1)
        break label431;
      int i = 2130837950;
      label261: ((ImageView)localObject1).setImageResource(i);
      localObject1 = this.mBnAt;
      if (paramUserInfo.gender != 1)
        break label439;
    }
    label367: String str10;
    label420: label431: label439: for (Object localObject2 = getString(2131427468); ; str10 = getString(2131427467))
    {
      ((Button)localObject1).setText((CharSequence)localObject2);
      setupGroupCount(paramUserInfo);
      return;
      Bitmap localBitmap1 = BitmapFactory.decodeFile(str3);
      if (localBitmap1 == null)
        break;
      localObject1 = this.mIvPortrait;
      localObject2 = Utils.outputRoundRectBitmap(localBitmap1);
      if (paramUserInfo.vip);
      int m;
      for (int k = 1; ; m = 0)
      {
        Bitmap localBitmap2 = Utils.outputBmp(this, (Bitmap)localObject2, k);
        ((ImageView)localObject1).setImageBitmap(localBitmap2);
        break;
      }
      this.mHasNotAttention = 1;
      localObject1 = this.mBtnEditOrAttend;
      if (paramUserInfo.gender == 1);
      for (int j = 2131427463; ; j = 2131427462)
      {
        ((Button)localObject1).setText(j);
        this.mBtnEditOrAttend.setBackgroundResource(2130838111);
        break;
      }
      this.mBtnEditOrAttend.setVisibility(0);
      break label242;
      j = 2130837952;
      break label261;
    }
  }

  private void showProgress(int paramInt)
  {
    if (this.mPgToast == null)
    {
      CustomToast localCustomToast = Utils.createProgressCustomToast(paramInt, this);
      this.mPgToast = localCustomToast;
    }
    while (true)
    {
      this.mPgToast.show();
      return;
      this.mPgToast.setText(paramInt, this);
    }
  }

  private void topicOnClickAction()
  {
    Intent localIntent1 = new Intent(this, UserWeiboAttentionFansList.class);
    String str1 = this.mUid;
    Intent localIntent2 = localIntent1.putExtra("uid", str1);
    Intent localIntent3 = localIntent1.putExtra("mode", 4);
    String str2 = StaticInfo.mUsername;
    Intent localIntent4 = localIntent1.putExtra("username", str2);
    String str3 = StaticInfo.mPassword;
    Intent localIntent5 = localIntent1.putExtra("password", str3);
    if (this.mNick != null)
    {
      String str4 = this.mNick;
      Intent localIntent6 = localIntent1.putExtra("nick", str4);
    }
    startActivity(localIntent1);
  }

  private void weiboOnClickAction()
  {
    Intent localIntent1 = new Intent(this, UserWeiboAttentionFansList.class);
    String str1 = this.mUid;
    Intent localIntent2 = localIntent1.putExtra("uid", str1);
    Intent localIntent3 = localIntent1.putExtra("mode", 1);
    String str2 = StaticInfo.mUsername;
    Intent localIntent4 = localIntent1.putExtra("username", str2);
    String str3 = StaticInfo.mPassword;
    Intent localIntent5 = localIntent1.putExtra("password", str3);
    if (this.mNick != null)
    {
      String str4 = this.mNick;
      Intent localIntent6 = localIntent1.putExtra("nick", str4);
    }
    startActivity(localIntent1);
  }

  protected void handleTitleBarEvent(int paramInt)
  {
    switch (paramInt)
    {
    default:
    case 0:
    case 1:
    }
    while (true)
    {
      return;
      Intent localIntent1 = new Intent(this, MainTabActivity.class);
      Intent localIntent2 = localIntent1.setAction("com.sina.weibo.action.go_back_to_home");
      Intent localIntent3 = localIntent1.putExtra("MODE_KEY", 0);
      startActivity(localIntent1);
      finish();
      continue;
      finish();
    }
  }

  public void onClick(View paramView)
  {
    Button localButton1 = this.mBtnEditOrAttend;
    if (paramView == localButton1)
      addOrCancelAttend();
    while (true)
    {
      return;
      LinearLayout localLinearLayout1 = this.mRlWeibo;
      if (paramView == localLinearLayout1)
      {
        weiboOnClickAction();
        continue;
      }
      RelativeLayout localRelativeLayout = this.mLlAttend;
      if (paramView == localRelativeLayout)
      {
        focusOnClickAction();
        continue;
      }
      LinearLayout localLinearLayout2 = this.mLlFans;
      if (paramView == localLinearLayout2)
      {
        fansOnClickAction();
        continue;
      }
      LinearLayout localLinearLayout3 = this.mLlTopic;
      if (paramView == localLinearLayout3)
      {
        topicOnClickAction();
        continue;
      }
      Button localButton2 = this.mBnReload;
      if (paramView == localButton2)
      {
        reloadUserInfo();
        continue;
      }
      Button localButton3 = this.mBnAt;
      if (paramView == localButton3)
      {
        atCurrentUser();
        continue;
      }
      Button localButton4 = this.mBnMessage;
      if (paramView == localButton4)
      {
        sendMessage();
        continue;
      }
      super.onClick(paramView);
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setView(2130903092);
    this.isInitial = 1;
    String str1 = getString(2131427647);
    String str2 = getString(2131427528);
    String str3 = getString(2131427368);
    setTitleBar(1, str2, str1, str3);
    String str4 = getCacheDir().getAbsolutePath();
    this.mCacheDir = str4;
    Intent localIntent = getIntent();
    User localUser = StaticInfo.mUser;
    this.mUser = localUser;
    String str5 = localIntent.getStringExtra("nick");
    this.mNick = str5;
    String str6 = localIntent.getStringExtra("uid");
    this.mUid = str6;
    boolean bool = localIntent.getBooleanExtra("vip", 0);
    this.mVip = bool;
    if (((this.mNick == null) || (this.mNick.length() == 0)) && ((this.mUid == null) || (this.mUid.length() == 0)) && (StaticInfo.mUser != null))
    {
      String str7 = StaticInfo.mUser.nick;
      this.mNick = str7;
      String str8 = StaticInfo.mUser.uid;
      this.mUid = str8;
    }
    Button localButton1 = (Button)findViewById(2131624165);
    this.mBnReload = localButton1;
    this.mBnReload.setOnClickListener(this);
    Button localButton2 = (Button)findViewById(2131624166);
    this.mBnAt = localButton2;
    this.mBnAt.setOnClickListener(this);
    Button localButton3 = (Button)findViewById(2131624167);
    this.mBnMessage = localButton3;
    this.mBnMessage.setOnClickListener(this);
    this.mBnMessage.setEnabled(0);
    LinearLayout localLinearLayout1 = (LinearLayout)findViewById(2131624064);
    this.mRlWeibo = localLinearLayout1;
    this.mRlWeibo.setOnClickListener(this);
    LinearLayout localLinearLayout2 = (LinearLayout)findViewById(2131624070);
    this.mLlTopic = localLinearLayout2;
    this.mLlTopic.setOnClickListener(this);
    LinearLayout localLinearLayout3 = (LinearLayout)findViewById(2131624067);
    this.mLlFans = localLinearLayout3;
    this.mLlFans.setOnClickListener(this);
    RelativeLayout localRelativeLayout = (RelativeLayout)findViewById(2131624061);
    this.mLlAttend = localRelativeLayout;
    this.mLlAttend.setOnClickListener(this);
    ImageView localImageView1 = (ImageView)findViewById(2131624049);
    this.mIvPortrait = localImageView1;
    this.mIvPortrait.setVisibility(0);
    if (((BitmapDrawable)getResources().getDrawable(2130838011)).getBitmap().isRecycled())
      Bitmap localBitmap1 = BitmapFactory.decodeResource(getResources(), 2130838011);
    ImageView localImageView2 = this.mIvPortrait;
    Bitmap localBitmap2 = Utils.outputRoundRectBitmap(BitmapFactory.decodeResource(getResources(), 2130838011));
    Bitmap localBitmap3 = Utils.outputBmp(this, localBitmap2, 0);
    localImageView2.setImageBitmap(localBitmap3);
    TextView localTextView1 = (TextView)findViewById(2131624050);
    this.mTvNickName = localTextView1;
    TextView localTextView2 = this.mTvNickName;
    String str9 = this.mNick;
    localTextView2.setText(str9);
    ImageView localImageView3 = (ImageView)findViewById(2131624051);
    this.mIvGental = localImageView3;
    Button localButton4 = (Button)findViewById(2131624052);
    this.mBtnEditOrAttend = localButton4;
    this.mBtnEditOrAttend.setOnClickListener(this);
    this.mBtnEditOrAttend.setVisibility(4);
    UserInfoItemView localUserInfoItemView1 = (UserInfoItemView)findViewById(2131624168);
    this.mRlDigest1 = localUserInfoItemView1;
    TextView localTextView3 = (TextView)findViewById(2131624170);
    this.mTvAddress1 = localTextView3;
    TextView localTextView4 = (TextView)findViewById(2131624172);
    this.mTvSelfIntro1 = localTextView4;
    UserInfoItemView localUserInfoItemView2 = (UserInfoItemView)findViewById(2131624173);
    this.mRlDigest2 = localUserInfoItemView2;
    TextView localTextView5 = (TextView)findViewById(2131624175);
    this.mTvSinaVip = localTextView5;
    TextView localTextView6 = (TextView)findViewById(2131624178);
    this.mTvAddress2 = localTextView6;
    TextView localTextView7 = (TextView)findViewById(2131624181);
    this.mTvSelfIntro2 = localTextView7;
    if (this.mVip)
    {
      this.mRlDigest1.setVisibility(8);
      this.mRlDigest2.setVisibility(0);
    }
    while (true)
    {
      TextView localTextView8 = (TextView)findViewById(2131624065);
      this.mTvWeibo_Count = localTextView8;
      TextView localTextView9 = (TextView)findViewById(2131624068);
      this.mTvFans_Count = localTextView9;
      TextView localTextView10 = (TextView)findViewById(2131624071);
      this.mTvTopic_Count = localTextView10;
      TextView localTextView11 = (TextView)findViewById(2131624062);
      this.mTvAttend_Count = localTextView11;
      loadUserInfo();
      return;
      this.mRlDigest1.setVisibility(0);
      this.mRlDigest2.setVisibility(8);
    }
  }

  protected void onDestroy()
  {
    if ((!this.mUserTaskFree) && (this.mLoadUserInfoTask != null) && (!this.mLoadUserInfoTask.isCancelled()))
    {
      if ((!this.mUserTaskFree) && (this.mPgToast != null))
        this.mPgToast.cancel();
      boolean bool = this.mLoadUserInfoTask.cancel(1);
      this.mUserTaskFree = 1;
    }
    super.onDestroy();
  }

  protected void onPause()
  {
    super.onPause();
    if (this.mPgToast != null)
      this.mPgToast.cancel();
  }

  protected void onResume()
  {
    super.onResume();
  }

  class AttentionTask extends AsyncTask<Void, Void, Boolean>
  {
    private AttentionTask()
    {
    }

    protected Boolean doInBackground(Void[] paramArrayOfVoid)
    {
      Boolean localBoolean1 = Boolean.valueOf(1);
      try
      {
        Object localObject1;
        if (UserInfoActivity2.this.mUser == null)
        {
          localObject1 = Boolean.valueOf(0);
          return localObject1;
        }
        RPCHelper localRPCHelper1;
        User localUser1;
        String str1;
        if (UserInfoActivity2.this.mHasNotAttention)
        {
          localRPCHelper1 = RPCHelper.getInstance(UserInfoActivity2.this.getApplication());
          localUser1 = UserInfoActivity2.this.mUser;
          str1 = UserInfoActivity2.this.mUserInfo.uid;
        }
        Boolean localBoolean2;
        for (localObject2 = Boolean.valueOf(localRPCHelper1.addComment(localUser1, str1)); ; localObject2 = localBoolean2)
        {
          localObject1 = localObject2;
          break;
          RPCHelper localRPCHelper2 = RPCHelper.getInstance(UserInfoActivity2.this.getApplication());
          User localUser2 = UserInfoActivity2.this.mUser;
          String str2 = UserInfoActivity2.this.mUserInfo.uid;
          localBoolean2 = Boolean.valueOf(localRPCHelper2.cancelComment(localUser2, str2));
        }
      }
      catch (RPCHelper.HttpException localHttpException)
      {
        while (true)
          Object localObject2 = Boolean.valueOf(0);
      }
    }

    protected void onCancelled()
    {
      UserInfoActivity2.this.mAttendTaskFree = 1;
      if (UserInfoActivity2.this.mPgToast != null)
        UserInfoActivity2.this.mPgToast.cancel();
      UserInfoActivity2.this.setProgressBarIndeterminateVisibility(0);
    }

    protected void onPostExecute(Boolean paramBoolean)
    {
      UserInfoActivity2.this.mAttendTaskFree = 1;
      if (UserInfoActivity2.this.mPgToast != null)
        UserInfoActivity2.this.mPgToast.cancel();
      if (paramBoolean.booleanValue())
      {
        localObject = UserInfoActivity2.this;
        if (UserInfoActivity2.this.mHasNotAttention)
        {
          int i = 0;
          ((UserInfoActivity2)localObject).mHasNotAttention = i;
          if (!UserInfoActivity2.this.mHasNotAttention)
            break label135;
          localObject = UserInfoActivity2.this.mBtnEditOrAttend;
          if (UserInfoActivity2.this.mUserInfo.gender != 1)
            break label129;
          j = 2131427463;
          label94: ((Button)localObject).setText(j);
          UserInfoActivity2.this.mBtnEditOrAttend.setBackgroundResource(2130838111);
        }
        while (true)
        {
          UserInfoActivity2.this.mBtnEditOrAttend.setVisibility(0);
          return;
          j = 1;
          break;
          label129: j = 2131427462;
          break label94;
          label135: UserInfoActivity2.this.mBtnEditOrAttend.setText(2131427464);
          UserInfoActivity2.this.mBtnEditOrAttend.setBackgroundResource(2130838112);
        }
      }
      Object localObject = UserInfoActivity2.this;
      if (UserInfoActivity2.this.mHasNotAttention);
      for (int j = 2131427407; ; j = 2131427406)
      {
        Toast.makeText((Context)localObject, j, 0).show();
        break;
      }
    }

    protected void onPreExecute()
    {
      UserInfoActivity2.this.mAttendTaskFree = 0;
      UserInfoActivity2.this.showProgress(2131427429);
    }
  }

  class LoadPortraitTask extends AsyncTask<String, String, String>
  {
    private LoadPortraitTask()
    {
    }

    protected String doInBackground(String[] paramArrayOfString)
    {
      String str1 = paramArrayOfString[0];
      String str2 = paramArrayOfString[1];
      Object localObject1 = null;
      try
      {
        String str3 = RPCHelper.getInstance(UserInfoActivity2.this.getApplication()).getPicture(str1, str2);
        File localFile = new File(str3);
        if (localFile.exists())
        {
          String str4 = localFile.toString();
          localObject1 = str4;
        }
        localObject2 = localObject1;
        return localObject2;
      }
      catch (Exception localException)
      {
        while (true)
          Object localObject2 = null;
      }
    }

    protected void onPostExecute(String paramString)
    {
      ImageView localImageView;
      UserInfoActivity2 localUserInfoActivity2;
      Bitmap localBitmap1;
      if (paramString != null)
      {
        localImageView = UserInfoActivity2.this.mIvPortrait;
        localUserInfoActivity2 = UserInfoActivity2.this;
        localBitmap1 = Utils.outputRoundRectBitmap(BitmapFactory.decodeFile(paramString));
        if (!UserInfoActivity2.this.mUserInfo.vip)
          break label60;
      }
      label60: int j;
      for (int i = 1; ; j = 0)
      {
        Bitmap localBitmap2 = Utils.outputBmp(localUserInfoActivity2, localBitmap1, i);
        localImageView.setImageBitmap(localBitmap2);
        return;
      }
    }
  }

  class LoadUserInfoTask extends AsyncTask<Void, Void, UserInfo>
  {
    private LoadUserInfoTask()
    {
    }

    protected UserInfo doInBackground(Void[] paramArrayOfVoid)
    {
      try
      {
        if (UserInfoActivity2.this.mUser == null)
        {
          localUserInfo1 = null;
          return localUserInfo1;
        }
        UserInfoActivity2 localUserInfoActivity21;
        UserInfo localUserInfo2;
        if (UserInfoActivity2.this.mUid != null)
        {
          localUserInfoActivity21 = UserInfoActivity2.this;
          RPCHelper localRPCHelper1 = RPCHelper.getInstance(UserInfoActivity2.this.getApplication());
          User localUser1 = UserInfoActivity2.this.mUser;
          String str1 = UserInfoActivity2.this.mUid;
          localUserInfo2 = localRPCHelper1.getUserInfo(localUser1, str1, null);
        }
        UserInfoActivity2 localUserInfoActivity22;
        UserInfo localUserInfo3;
        for (localUserInfoActivity21.mUserInfo = localUserInfo2; ; localUserInfoActivity22.mUserInfo = localUserInfo3)
        {
          localUserInfo1 = UserInfoActivity2.this.mUserInfo;
          break;
          localUserInfoActivity22 = UserInfoActivity2.this;
          RPCHelper localRPCHelper2 = RPCHelper.getInstance(UserInfoActivity2.this.getApplication());
          User localUser2 = UserInfoActivity2.this.mUser;
          String str2 = UserInfoActivity2.this.mNick;
          localUserInfo3 = localRPCHelper2.getUserInfo(localUser2, null, str2);
        }
      }
      catch (RPCHelper.HttpException localHttpException)
      {
        while (true)
          UserInfo localUserInfo1 = null;
      }
    }

    protected void onCancelled()
    {
      UserInfoActivity2.this.mUserTaskFree = 1;
      if (UserInfoActivity2.this.mPgToast != null)
        UserInfoActivity2.this.mPgToast.cancel();
    }

    protected void onPostExecute(UserInfo paramUserInfo)
    {
      UserInfoActivity2.this.mUserTaskFree = 1;
      if (UserInfoActivity2.this.mPgToast != null)
        UserInfoActivity2.this.mPgToast.cancel();
      if (paramUserInfo == null)
      {
        UserInfoActivity2 localUserInfoActivity2 = UserInfoActivity2.this;
        String str = UserInfoActivity2.this.getString(2131427409);
        Toast.makeText(localUserInfoActivity2, str, 0).show();
      }
      while (true)
      {
        return;
        UserInfoActivity2.this.setupUI(paramUserInfo);
      }
    }

    protected void onPreExecute()
    {
      UserInfoActivity2.this.mUserTaskFree = 0;
      UserInfoActivity2.this.showProgress(2131427408);
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     com.sina.weibo.UserInfoActivity2
 * JD-Core Version:    0.6.0
 */